package cn.kgc.kgde.bookstore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author myt
 * @since 2022-05-31
 */
@TableName("cartitem")
@ApiModel(value = "Cartitem对象", description = "")
public class Cartitem implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("购物车详情id")
    @TableId(value = "cartItemId", type = IdType.AUTO)
    private Long cartItemId;

    @ApiModelProperty("购物车id")
    private Long cartId;

    @ApiModelProperty("图书id")
    private Long bookId;

    @ApiModelProperty("数量")
    private Integer quantity;

    private Double cost;

    public Long getCartItemId() {
        return cartItemId;
    }

    public void setCartItemId(Long cartItemId) {
        this.cartItemId = cartItemId;
    }
    public Long getCartId() {
        return cartId;
    }

    public void setCartId(Long cartId) {
        this.cartId = cartId;
    }
    public Long getBookId() {
        return bookId;
    }

    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    @Override
    public String toString() {
        return "Cartitem{" +
            "cartItemId=" + cartItemId +
            ", cartId=" + cartId +
            ", bookId=" + bookId +
            ", quantity=" + quantity +
        "}";
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }
}
